package commons.base.httpserver;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * spring mvc全局操作可以放在这里
 * @author yuan<cihang.yuan@happyelements.com>
 *
 */
@ControllerAdvice
public class GlobalController {

	/**
	 * 全局异常处理
	 * @param t
	 * @return
	 */
	@ExceptionHandler(value = { Throwable.class })
	public Object handleExceptions(Throwable t) {
		System.err.println("======================");
		t.printStackTrace();
		
		return null;
	}
}
